USE Curriculum
IF	EXISTS (
		SELECT	name 
		FROM	sysobjects
		WHERE	name = 'CandidateChangeDate' AND type = 'TR')
	DROP TRIGGER CandidateChangeDate
GO
CREATE TRIGGER CandidateChangeDate
ON Candidate
AFTER INSERT, UPDATE
AS
	Declare @MyId int
	select	@MyId = CandidateId
	from	inserted
	
	update	Candidate
	set		ChangeDate = GetDate()	
	where	CandidateId = @MyId	
GO
